const currentDate = new Date();

const currentDateFormat = `Current Date and Time: ${currentDate}`;

console.log(currentDateFormat);

const formatDateMMDDYYYY = date => {
  const month = date.getMonth() + 1;
  const day = date.getDate();
  const year = date.getFullYear();
  return `Formatted Date (MM/DD/YYYY): ${month}/${day}/${year}`;
}
console.log(formatDateMMDDYYYY(currentDate));
console.log(formatDateMMDDYYYY(new Date("Fri Sep 27 2024 16:16:11 GMT+0500 (Pakistan Standard Time)")));
const formatDateLong = date => {
  const options = {
    year: "numeric",
    month: "long",
    day: "numeric",
  };
  return `Formatted Date (Month Day, Year): ${date.toLocaleDateString("en-US", options)}`;
}

console.log(formatDateLong(currentDate))
